package com.denlaku.longan.audit;

import java.util.Map;

/**
 * @author tianx
 */
public final class AuditVariables {
    private static final ThreadLocal<AuditVariablesPack> TL = ThreadLocal.withInitial(AuditVariablesPack::new);

    public static void set(String name, Object value) {
        TL.get().setVariable(name, value);
    }

    static Map<String, Object> getVariables() {
        return TL.get().getVariables();
    }

    static void clear() {
        TL.get().clear();
    }

    static void init() {
        TL.get().init();
    }

}
